<template>
    <div>
      <div id="top">
        <div id="topBar">
          <router-link :to="{path:'/exchangePoints/detail/exchangeSuccess'}"><van-icon name="arrow-left" style="float: left;margin-top: 0.5rem;margin-left: 0.5rem"/>
            <p style="float: left">订单详情</p></router-link>
        </div>
      </div>
      <div id="bottom">
      <p>{{name}}</p>
      <div id="pic" :style="{backgroundImage: 'url(' + img + ')', backgroundRepeat:'no-repeat', backgroundSize: 'cover',backgroundPosition:'center center'}"></div>
        <p>订单编号：{{orderNum}}</p>
        <p>花费积分：{{points}}</p>
        <p>日期：{{date}}</p>
      </div>
    </div>
</template>

<script>
    export default {
        name: "orderInfo",
      data(){
          return{
            name:"巨无敌大的汽车",
            orderNum:281987648372,
            points:27368,
            date:"2019/12/31",
            img:"https://img.yzcdn.cn/vant/apple-1.jpg",
          }
      }
    }
</script>

<style scoped>
  #top{
    width: 100%;
    height:4rem;
    background: red;
    overflow: hidden;
    position: relative;
  }
  #topBar{
    height: 2rem;
    width: 100%;
    line-height: 2rem;
    background: papayawhip;
    color:black;
    font-size: 1rem;
    margin-top: 1rem;
  }
  #topBar p{
    display: inline-block;
  }
  #bottom{
    width:100%;
    background: #42b983;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow: hidden;
  }
  #pic{
    width: 100%;
    height: 13rem;
    overflow: hidden;
  }
  #bottom p{
   font-size: 1rem;
  text-align: left;
    margin: 0.5rem 0;
    width: 100%;
  }
</style>
